package com.shgbit.sdis.mapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import com.shgbit.sdis.bean.DemoCity;


/**
 * Mapper类Demo
 * @author liulinqing
 * 上午10:54:45
 */
public class DemoCityMapper implements RowMapper<DemoCity>{

	@Override
	public DemoCity mapRow(ResultSet rs, int rowNum) throws SQLException {
		DemoCity city = new DemoCity();
		city.setId(rs.getInt("ID"));
		city.setName(rs.getString("Name"));
		city.setCountryCode(rs.getString("CountryCode"));
		city.setDistrict(rs.getString("District"));
		city.setPopulation(rs.getString("Population"));
        return city;
	}
}
